package com.hlddz.venue_reservation.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hlddz.venue_reservation.entity.ReserveVisitor;
import com.hlddz.venue_reservation.entity.Visitor;
import com.hlddz.venue_reservation.mapper.ReserveVisitorMapper;
import com.hlddz.venue_reservation.service.ReserveVisitorService;
import com.hlddz.venue_reservation.service.VisitorService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author MoShang
 * @since 2024年05月31日
 */
@Service
public class ReservevisitorServiceImpl extends ServiceImpl<ReserveVisitorMapper, ReserveVisitor> implements ReserveVisitorService {
    @Resource
    private ReserveVisitorMapper reserveVisitorMapper;

    @Resource
    private VisitorService visitorService;

    @Override
    public void addVisitorReserveInfo(List<Visitor> visitorInfo, int reserveId) {
        for(Visitor v:visitorInfo){
            reserveVisitorMapper.addReserveVisitor(reserveId,v.getVisitorId());
        }

    }
}
